package com.iretailer.report.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iretailer.report.dto.QueryOption;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Auther xjw
 * @Date 2019/1/19 1651
 * @Description
 */
@TableName(value = "s_categories")
public class Categories {

    @JSONField(name = "Id")
    @TableId(value = "Id", type = IdType.UUID)
    private String id;

    @JSONField(name = "Name")
    @TableField(value = "Name")
    private String name;

    @JSONField(name = "KeyName")
    @TableField(value = "KeyName")
    private String keyName;

    @JSONField(name = "Data")
    @TableField(value = "Data")
    private String data;

    @JSONField(name = "ParentId")
    @TableField(value = "ParentId")
    private String parentId;

    @JSONField(name = "ImageUrl")
    @TableField(value = "ImageUrl")
    private String imageUrl;

    @JSONField(name = "Ranked")
    @TableField(value = "Ranked")
    private Integer ranked;

    @JSONField(name = "UpdateUser")
    @TableField(value = "UpdateUser")
    private String updateUser;

    @JSONField(name = "Visible")
    @TableField(value = "Visible")
    private Integer visible;

    @JSONField(name = "UpdateTime")
    @TableField(value = "UpdateTime")
    private LocalDateTime updateTime = LocalDateTime.now();

    @JSONField(name = "Description")
    @TableField(value = "Description")
    private String description;

    @JSONField(name = "children")
    @TableField(exist = false)
    private List<Categories> children;

    public Categories() {
    }

    public Categories(String id, String name) {
        this.id = id;
        this.name = name;
    }
    public static Categories FirstCategory = new Categories("-", "smart_retail");
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getRanked() {
        return ranked;
    }

    public void setRanked(Integer ranked) {
        this.ranked = ranked;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Integer getVisible() {
        return visible;
    }

    public void setVisible(Integer visible) {
        this.visible = visible;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Categories> getChildren() {
        return children;
    }

    public void setChildren(List<Categories> children) {
        this.children = children;
    }
}
